@extends('admin.layout')
@section('title',$title)
@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                店铺管理
                <small>店铺管理修改页面</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 店铺管理</a></li>
                <li class="active">店铺修改</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">店铺修改</h3>
                        </div>
                        
                        <!-- 修改失败时的提示信息 -->
                        @if(session('error'))
                            {{session('error')}}
                        @endif
                        
                        <!-- 限制条件不符合是的提示信息 -->
                        @if (count($errors) > 0)
                            <div class="alert alert-danger">
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif
                        
                        <!-- form start -->
                        <form role="form" action="/admin/shop/update" method="post" enctype="multipart/form-data">
                            {{ csrf_field() }}
                            <input type="hidden" name="oldlogo" value="{{$data->logo}}">
                            <input type="hidden" name="id" value="{{$data->id}}">
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputEmail1">店铺名</label>
                                    <input type="text" name="shopname" value="{{$data->shopname}}" class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入不大于30字符的店铺名">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">店主id</label>
                                    <input type="text" value="{{$data->sellerid}}" name="sellerid" class="form-control" id="exampleInputPassword1"
                                           placeholder="请输入店主id">
                                </div>
                                <div class="form-group">
                                    <label>goodShop</label>
                                    <select name="goodshop" class="form-control">
                                        <option value="0" @if($data->goodshop==0) selected @endif >否</option>
                                        <option value="1" @if($data->goodshop==1) selected @endif >是</option>
                                    
                                        </option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>店铺状态</label>
                                    <select name="status" class="form-control">
                                        <option value="1" @if($data->status==1) selected @endif>正常</option>
                                        <option value="0" @if($data->status==0) selected @endif>禁用</option>
                                        </option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputFile">店铺logo</label>
                                    <ul id="warp">
                                        <li style="list-style-type: none;">
                                            <img id="imgShow_WU_FILE_0" src="{{$data->logo}}"width="200" height="200" />
                                            <input type="file" id="up_img_WU_FILE_0" name="logo" />
                                        </li>
                                    </ul>
                                    <p class="help-block">请输入漂亮的图片</p>
                                </div>
                                
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">修改</button>
                                <button type="submitreset" class="btn btn-danger">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                   
                </div><!--/.col (left) -->

            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection
